﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using DAO;
namespace APA_DAO
{
    public class DanhSachPhieuThuDao
    {
        public DanhSachPhieuThuDao()
        {
            new SqlHelper();
        }

        public DataTable getDanhSachPhieuThu(string str, DateTime? fromDate, DateTime? toDate)
        {
            return SqlHelper.ExecuteDataTable("SP_GET_DANH_SACH_PHIEU_THU", CommandType.StoredProcedure,
                "@SEARCH_STRING", str,
                "@FROM_DATE", fromDate,
                "@TO_DATE", toDate);
        }

        public bool deletePhieuThu(int id)
        {
            return SqlHelper.ExecuteNonQuery("SP_DELETE_THU_TIEN", CommandType.StoredProcedure,
                "@ID", id,
                "@USR_ID", LoginDao.userID);
        } 
    }
}
